home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Franz PD
/
Franz PD Disk #221 (1993)(Rhein-Sieg-Soft).zip
/
Franz PD Disk #221 (1993)(Rhein-Sieg-Soft).adf
/
DiscCatalogue
/
DC.AMOS
/
DC.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1993-02-15
|
15KB
|
536 lines
'----------------------------------------------
'* *
'* " DiscCatalogue " *
'* *
'* *
'* von *
'* *
'* Michael Reiche *
'* *
'* *
'----------------------------------------------
'
Screen Open 0,640,256,8,Hires : Cls 0
Global FILE$,DSL,DSE,DS,J,N
Global DNR$,DNAME$,PNAME$,GTDAS$,GENRE$,BEM$,SB$
N=0 : J=1
SCR
OP_DAT
Procedure SCR
Hide
Unpack 10 To 0 : Erase 10
Limit Mouse 128,42 To 447,297
Reserve Zone 21
Set Zone 1,16,32 To 105,48
Set Zone 2,16,59 To 105,75
Set Zone 3,124,32 To 213,48
Set Zone 4,124,59 To 213,75
Set Zone 5,232,32 To 321,48
Set Zone 6,232,59 To 321,75
Set Zone 7,340,31 To 366,45
Set Zone 8,385,31 To 411,45
Set Zone 9,340,66 To 366,80
Set Zone 10,385,66 To 411,80
Set Zone 11,431,32 To 520,48
Set Zone 12,431,59 To 520,75
Set Zone 13,539,32 To 628,48
Set Zone 14,539,59 To 628,75
Set Zone 15,159,134 To 217,146
Set Zone 16,159,150 To 337,162
Set Zone 17,159,166 To 416,178
Set Zone 18,159,182 To 218,194
Set Zone 19,159,198 To 376,210
Set Zone 20,159,214 To 416,226
Set Zone 21,159,230 To 233,242
GADG_NEU
Show
End Proc
Procedure OP_DAT
Repeat
FILE$=Fsel$("*.DC","","Bitte Katalog laden,","Suffix .DC beachten")
Until FILE$<>""
Open Random 1,FILE$
Field 1,5 As DNR$,20 As DNAME$,30 As PNAME$,5 As GTDAS$,25 As GENRE$,30 As BEM$,7 As SB$
DSL=5+20+30+5+25+30+7
DSE=Lof(1)/DSL
DS=1
If DSE<>0
Get 1,DS
Else
DSE=1
End If
DS_NEU
End Proc
Do
Multi Wait
Screen 0
Paper 6 : Pen 1 : Print At(3,13);"Freier Speicher: ";Chip Free+Fast Free;" Bytes"
Repeat
Wait Vbl
M=Mouse Zone : Curs Pen 7
If Mouse Key=1
If M=15 : Print At(21,17);String$(" ",5) : DNR$="" : DNR_IN : End If
If M=16 : Print At(21,19);String$(" ",20) : DNAME$="" : DNAME_IN : End If
If M=17 : Print At(21,21);String$(" ",30) : PNAME$="" : PNAME_IN : End If
If M=18 : Print At(21,23);String$(" ",5) : GTDAS$="" : GTDAS_IN : End If
If M=19 : Print At(21,25);String$(" ",25) : GENRE$="" : GENRE_IN : End If
If M=20 : Print At(21,27);String$(" ",30) : BEM$="" : BEM_IN : End If
If M=21 : Print At(21,29);String$(" ",7) : SB$="" : SB_IN : End If
Curs Off
If M<>0 and M<15
CL_GADG[M]
On M Proc HILFE,LADEN,SRT,NEU_DS,SUCHEN,SICHERN,_NEXT,LAST,PREV,FIRST,DRUCK,STAT,INFO,_ENDE
DS_NEU
End If
End If
Until Mouse Key
Loop
Procedure CL_GADG[M]
If M<>0 and Mouse Key=1
If M=1 : Paste Bob 16,31,15 : End If
If M=2 : Paste Bob 16,58,16 : End If
If M=3 : Paste Bob 124,31,17 : End If
If M=4 : Paste Bob 124,58,18 : End If
If M=5 : Paste Bob 232,31,19 : End If
If M=6 : Paste Bob 232,58,20 : End If
If M=7 : Paste Bob 340,30,21 : End If
If M=8 : Paste Bob 385,30,22 : End If
If M=9 : Paste Bob 340,65,23 : End If
If M=10 : Paste Bob 385,65,24 : End If
If M=11 : Paste Bob 431,31,25 : End If
If M=12 : Paste Bob 431,58,26 : End If
If M=13 : Paste Bob 539,31,27 : End If
If M=14 : Paste Bob 539,58,28 : End If
End If
Repeat
Wait Vbl
Until Mouse Key=0
GADG_NEU
End Proc
Procedure DS_NEU
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Paper 6 : Pen 1 : Print At(3,13);"Freier Speicher: ";Chip Free+Fast Free;" Bytes"
Pen 2
Print At(2,11);"Datei"
Pen 1
Print At(11,11);Right$(FILE$,35)
Print At(52,11);"Datensatz-Nr.";DS
Print At(21,17);Right$(DNR$,5)
Print At(21,19);Right$(DNAME$,20)
Print At(21,21);Right$(PNAME$,30)
Print At(21,23);Right$(GTDAS$,5)
Print At(21,25);Right$(GENRE$,25)
Print At(21,27);Right$(BEM$,30)
Print At(21,29);Right$(SB$,7)
End Proc
Procedure GADG_NEU
Paste Bob 16,31,1
Paste Bob 16,58,2
Paste Bob 124,31,3
Paste Bob 124,58,4
Paste Bob 232,31,5
Paste Bob 232,58,6
Paste Bob 340,30,7
Paste Bob 385,30,8
Paste Bob 340,65,9
Paste Bob 385,65,10
Paste Bob 431,31,11
Paste Bob 431,58,12
Paste Bob 539,31,13
Paste Bob 539,58,14
End Proc
Procedure SUCHEN
If DSE>1
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Print At(2,11);"Was soll ich suchen ?"
Locate 24,11
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(SUCH$)>0
SUCH$=Left$(SUCH$,Len(SUCH$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(SUCH$)<>36
Print K$;
SUCH$=SUCH$+K$
End If
Until S=68
SUCH$=Upper$(SUCH$)
Curs Off
Change Mouse 3
VDS=DS
For DS=1 To DSE
Get 1,DS
F=N
If Instr(Upper$(DNR$),SUCH$) : F=J : End If
If Instr(Upper$(DNAME$),SUCH$) : F=J : End If
If Instr(Upper$(PNAME$),SUCH$) : F=J : End If
If Instr(Upper$(GTDAS$),SUCH$) : F=J : End If
If Instr(Upper$(GENRE$),SUCH$) : F=J : End If
If Instr(Upper$(BEM$),SUCH$) : F=J : End If
If Instr(Upper$(SB$),SUCH$) : F=J : End If
If F
VDS=DS
DS_NEU
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Print At(2,11);"Gefunden in Datensatz-Nr.";DS : Print At(33,11);" Weitersuchen? Ja/Nein"
Print At(2,13);"linke Maustaste = Ja rechte Maustaste = Nein"
Repeat
MK=Mouse Key
Until MK=1 or MK=2
If MK=2 : Exit : End If
DS_NEU
End If
Next
If F=N
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Print At(3,11);"Nicht gefunden! >> Taste <<"
Print At(2,13);String$(" ",50)
Wait Key
DS=VDS
Get 1,DS
End If
Change Mouse 1
DS_NEU
DS=VDS
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Paper 6 : Pen 1 : Print At(3,13);"Freier Speicher: ";Chip Free+Fast Free;" Bytes"
End If
End Proc
Procedure NEU_DS
Inc DSE
DS=DSE
DNR$="" : DNAME$="" : PNAME$="" : GTDAS$="" : GENRE$="" : BEM$="" : SB$=""
SICHERN
CLB
DS_NEU
End Proc
Procedure DNR_IN
Locate 21,17
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(DNR$)>0
DNR$=Left$(DNR$,Len(DNR$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(DNR$)<>5
Print K$;
DNR$=DNR$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure DNAME_IN
Locate 21,19
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(DNAME$)>0
DNAME$=Left$(DNAME$,Len(DNAME$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(DNAME$)<>20
Print K$;
DNAME$=DNAME$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure PNAME_IN
Locate 21,21
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(PNAME$)>0
PNAME$=Left$(PNAME$,Len(PNAME$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(PNAME$)<>30
Print K$;
PNAME$=PNAME$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure GTDAS_IN
Locate 21,23
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(GTDAS$)>0
GTDAS$=Left$(GTDAS$,Len(GTDAS$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(GTDAS$)<>5
Print K$;
GTDAS$=GTDAS$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure GENRE_IN
Locate 21,25
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(GENRE$)>0
GENRE$=Left$(GENRE$,Len(GENRE$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(GENRE$)<>25
Print K$;
GENRE$=GENRE$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure BEM_IN
Locate 21,27
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(BEM$)>0
BEM$=Left$(BEM$,Len(BEM$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(BEM$)<>30
Print K$;
BEM$=BEM$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure SB_IN
Locate 21,29
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(SB$)>0
SB$=Left$(SB$,Len(SB$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(SB$)<>7
Print K$;
SB$=SB$+K$
End If
Until S=68
Curs Off
DS_NEU
End Proc
Procedure LADEN
Close 1
DNR$="" : DNAME$="" : PNAME$="" : GTDAS$="" : GENRE$="" : BEM$="" : SB$=""
OP_DAT
CLB
End Proc
Procedure HILFE
VDS=DS
H$=Fsel$("*.Help","","Bitte DC.Help laden")
Wait Vbl
If H$="" Then Pop Proc
Hide
Load H$,11
Unpack 11 To 1 : Screen To Front 1
Do
Screen 1
A$=Inkey$
S=Scancode
If S=76
If Y<>0
Y=Y-3
End If
End If
If S=77
If Y<>438
Y=Y+3
End If
End If
Screen Offset 1,0,Y
If S=69 Then Exit
Loop
Screen Close 1 : Erase 11
Show
DS=VDS
DS_NEU
End Proc
Procedure STAT
If DSE>1
Change Mouse 3
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Ink 0 : Bar 456,123 To 604,223
YG=0 : YT=0 : YD=0 : YA=0 : YS=0
For DS=1 To DSE
Get 1,DS
If Instr(Upper$(GTDAS$),"GAME") : Inc YG : End If
If Instr(Upper$(GTDAS$),"TOOL") : Inc YT : End If
If Instr(Upper$(GTDAS$),"DEMO") : Inc YD : End If
If Instr(Upper$(GTDAS$),"ASCII") : Inc YA : End If
If Instr(Upper$(GTDAS$),"SONST") : Inc YS : End If
Next
Paper 6 : Pen 1 : Print At(2,11);"Games:";YG;"/Tools:";YT;"/Demos:";YD;"/ASCII:";YA;"/Sonst:";YS
Print At(64,11);">> Taste <<"
Print At(2,13);"Gesamtanzahl der Programme:";YG+YT+YD+YA+YS
If YG<>0 and((100*YG)/(YG+YT+YD+YA+YS))>1
Ink 6 : Bar 458,224-((100*YG)/(YG+YT+YD+YA+YS)) To 473,223
End If
If YT<>0 and((100*YT)/(YG+YT+YD+YA+YS))>1
Ink 5 : Bar 490,224-((100*YT)/(YG+YT+YD+YA+YS)) To 505,223
End If
If YD<>0 and((100*YD)/(YG+YT+YD+YA+YS))>1
Ink 1 : Bar 522,224-((100*YD)/(YG+YT+YD+YA+YS)) To 537,223
End If
If YA<>0 and((100*YA)/(YG+YT+YD+YA+YS))>1
Ink 7 : Bar 554,224-((100*YA)/(YG+YT+YD+YA+YS)) To 569,223
End If
If YS<>0 and((100*YS)/(YG+YT+YD+YA+YS))>1
Ink 4 : Bar 586,224-((100*YS)/(YG+YT+YD+YA+YS)) To 601,223
End If
Wait Key : Change Mouse 1
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Paper 6 : Pen 1 : Print At(3,13);"Freier Speicher: ";Chip Free+Fast Free;" Bytes"
Dec DS
End If
End Proc
Procedure DRUCK
On Error Proc FEHLER
If DSE>1
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Print At(2,11);"Bitte den Namen der Diskette eingeben:"
Locate 42,11
Clear Key : Curs On
Repeat
K$=Inkey$
S=Scancode
If S=65 and Len(SUCH$)>0
SUCH$=Left$(SUCH$,Len(SUCH$)-1)
Locate X Curs-1, : Print " "; : Locate X Curs-1, :
End If
If(K$>=Chr$(32)) and(K$<=Chr$(255)) and(K$<>Chr$(44)) and Len(SUCH$)<>20
Print K$;
SUCH$=SUCH$+K$
End If
Until S=68
Curs Off
Open Port 2,"PRT:"
Print #2,SUCH$
Print #2,
SUCH$=Upper$(SUCH$)
For DS=1 To DSE
Get 1,DS
If Instr(Upper$(DNAME$),SUCH$)
Print #2,PNAME$
End If
Next
Print #2,
Close 2
End If
End Proc
Procedure SRT
If DSE>1
Change Mouse 3
For W=1 To DSE-1 : FSRT=J
Get 1,DSE
For DS=DSE-1 To W Step -1
EDNR$=DNR$ : EDNAME$=DNAME$ : EPNAME$=PNAME$ : EGTDAS$=GTDAS$ : EGENRE$=GENRE$ : EBEM$=BEM$ : ESB$=SB$
Get 1,DS
ZDNR$=DNR$ : ZDNAME$=DNAME$ : ZPNAME$=PNAME$ : ZGTDAS$=GTDAS$ : ZGENRE$=GENRE$ : ZBEM$=BEM$ : ZSB$=SB$
TAUSCH=N
If Upper$(ZDNAME$)>Upper$(EDNAME$)
TAUSCH=J
End If
If TAUSCH
DNR$=ZDNR$ : DNAME$=ZDNAME$ : PNAME$=ZPNAME$ : GTDAS$=ZGTDAS$ : GENRE$=ZGENRE$ : BEM$=ZBEM$ : SB$=ZSB$
Put 1,DS+1
DNR$=EDNR$ : DNAME$=EDNAME$ : PNAME$=EPNAME$ : GTDAS$=EGTDAS$ : GENRE$=EGENRE$ : BEM$=EBEM$ : SB$=ESB$
Put 1,DS
FSRT=N
End If
Next
If FSRT : Exit : End If
Next
DS=1 : Get 1,DS
Change Mouse 1
Else
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Print At(3,11);"Nichts zu sortieren ! >> Taste <<" : Wait Key : End If
End Proc
Procedure SICHERN
Put 1,DS
DS_NEU
End Proc
Procedure _NEXT
If DS<DSE
Inc DS
Get 1,DS
End If
End Proc
Procedure LAST
If DS<DSE
DS=DSE
Get 1,DS
End If
End Proc
Procedure PREV
If DS>1
Dec DS
Get 1,DS
End If
End Proc
Procedure FIRST
If DS>1
DS=1
Get 1,DS
End If
End Proc
Procedure INFO
Repeat
Paste Bob 12,29,29
Until Mouse Key
Ink 4 : Bar 10,28 To 324,83
GADG_NEU
DS_NEU
End Proc
Procedure CLB
Print At(21,17);String$(" ",5)
Print At(21,19);String$(" ",20)
Print At(21,21);String$(" ",30)
Print At(21,23);String$(" ",5)
Print At(21,25);String$(" ",25)
Print At(21,27);String$(" ",30)
Print At(21,29);String$(" ",7)
End Proc
Procedure _ENDE
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Print At(3,11);"Sind Sie Sicher? linke Maustaste = Ja rechte Maustate = Nein"
Do
MK=Mouse Key
If MK=1 Then Exit
If MK=2 Then Pop Proc
Loop
Close 1
Reserve Zone
Screen Close 0
Erase 1
Edit
End Proc
Procedure FEHLER
Paper 6 : Pen 1 : Print At(2,11);String$(" ",76) : Print At(2,13);String$(" ",50)
Paper 6 : Pen 1 : Print At(3,13);"Freier Speicher: ";Chip Free+Fast Free;" Bytes"
Resume Next
End Proc